﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JasLib.Interop.Win32
{
    public static class Constants
    {
        public const uint ATTACH_PARENT_PROCESS = unchecked((uint)-1);
        public const int CCHDEVICENAME = 32;
        public const uint FACILITY_NT_BIT = 0x10000000;
        public const uint IGNORE = 0;
        public const uint INFINITE = 0xFFFFFFFF;
        public const int JET_BASE_NAME_LENGTH = 3;
        public const int JET_cbBookmarkMost = 256;
        public const int JET_cbNameMost = 64;
        public const int JET_IOPriorityNormal = 0;
        public const int JET_IOPriorityLow = 1;
        public const int JET_MAX_COMPUTERNAME_LENGTH = 15;
        public const int JET_MoveFirst = unchecked((int)0x80000000);
        public const int JET_MovePrevious = -1;
        public const int JET_MoveNext = 1;
        public const int JET_MoveLast = 0x7fffffff;
        public const int MAX_COUNTER_PATH = 256; // Maximum counter path length. This is an obsolute constance.
        public const int MAX_MODULE_NAME32 = 255;
        public const int MAX_PATH = 260;
        public const int MAX_TRANSACTION_DESCRIPTION_LENGTH = 64;
        public const int MAX_RESOURCEMANAGER_DESCRIPTION_LENGTH = 64;
        public const int MAXPNAMELEN = 32;
        public const int PDH_MAX_COUNTER_NAME = 1024;  // Maximum counter name length.
        public const int PDH_MAX_COUNTER_PATH = 2048;  // Maximum full counter path length.
        public const int PDH_MAX_DATASOURCE_PATH = 1024;  // MAximum full counter log name length.
        public const int PDH_MAX_INSTANCE_NAME = 1024;  // Maximum counter instance name length.
        public const int PDH_MAX_SCALE  = 7;
        public const int PDH_MIN_SCALE = -7;
        public const int PERF_NO_INSTANCES = -1;
        public const int PERF_NO_UNIQUE_ID = -1;
        public const uint SEVERITY_SUCCESS = 0;
        public const uint SEVERITY_ERROR = 1;
        public const uint STILL_ACTIVE = 259;
        public const uint USER_TIMER_MINIMUM = 0x0000000A;
        public const uint USER_TIMER_MAXIMUM = 0x7FFFFFFF;
        public const uint WAIT_ABANDONED = 0x00000080;
        public const uint WAIT_FAILED = 0xFFFFFFFF;
        public const uint WAIT_TIMEOUT = 0x00000102;

        public const string KERNEL_LOGGER_NAME = "NT Kernel Logger";
        public const string GLOBAL_LOGGER_NAME = "GlobalLogger";
        public const string EVENT_LOGGER_NAME = "EventLog";
        public const string DIAG_LOGGER_NAME = "DiagLog";

        public const WinEventCode EVENT_MIN = (WinEventCode)0x00000001;
        public const WinEventCode EVENT_MAX = (WinEventCode)0x7FFFFFFF;
        public const WinEventCode EVENT_SYSTEM_END = (WinEventCode)0x00FF;
        public const WinEventCode EVENT_OEM_DEFINED_START = (WinEventCode)0x0101;
        public const WinEventCode EVENT_OEM_DEFINED_END = (WinEventCode)0x01FF;
        public const WinEventCode EVENT_CONSOLE_END = (WinEventCode)0x40FF;
        public const WinEventCode EVENT_UIA_EVENTID_START = (WinEventCode)0x4E00;
        public const WinEventCode EVENT_UIA_EVENTID_END = (WinEventCode)0x4EFF;
        public const WinEventCode EVENT_UIA_PROPID_START = (WinEventCode)0x7500;
        public const WinEventCode EVENT_UIA_PROPID_END = (WinEventCode)0x75FF;
        public const WinEventCode EVENT_OBJECT_END = (WinEventCode)0x80FF;
        public const WinEventCode EVENT_AIA_START = (WinEventCode)0xA000;
        public const WinEventCode EVENT_AIA_END = (WinEventCode)0xAFFF;

        // Codes 0x0-0x01ff are reserved for the OLE group of interfaces.
        // Generic OLE errors that may be returned by many interfaces
        public const HRESULT OLE_E_FIRST = (HRESULT)0x80040000;
        public const HRESULT OLE_E_LAST = (HRESULT)0x800400FF;
        public const HRESULT OLE_S_FIRST = (HRESULT)0x00040000;
        public const HRESULT OLE_S_LAST = (HRESULT)0x000400FF;
        public const HRESULT DRAGDROP_E_FIRST = (HRESULT)0x80040100;
        public const HRESULT DRAGDROP_E_LAST = (HRESULT)0x8004010F;
        public const HRESULT DRAGDROP_S_FIRST = (HRESULT)0x00040100;
        public const HRESULT DRAGDROP_S_LAST = (HRESULT)0x0004010F;
        public const HRESULT CLASSFACTORY_E_FIRST = (HRESULT)0x80040110L;
        public const HRESULT CLASSFACTORY_E_LAST = (HRESULT)0x8004011F;
        public const HRESULT CLASSFACTORY_S_FIRST = (HRESULT)0x00040110;
        public const HRESULT CLASSFACTORY_S_LAST = (HRESULT)0x0004011F;
        public const HRESULT MARSHAL_E_FIRST = (HRESULT)0x80040120;
        public const HRESULT MARSHAL_E_LAST = (HRESULT)0x8004012F;
        public const HRESULT MARSHAL_S_FIRST = (HRESULT)0x00040120;
        public const HRESULT MARSHAL_S_LAST = (HRESULT)0x0004012F;
        public const HRESULT DATA_E_FIRST = (HRESULT)0x80040130;
        public const HRESULT DATA_E_LAST = (HRESULT)0x8004013F;
        public const HRESULT DATA_S_FIRST = (HRESULT)0x00040130;
        public const HRESULT DATA_S_LAST = (HRESULT)0x0004013F;
        public const HRESULT VIEW_E_FIRST = (HRESULT)0x80040140;
        public const HRESULT VIEW_E_LAST = (HRESULT)0x8004014F;
        public const HRESULT VIEW_S_FIRST = (HRESULT)0x00040140;
        public const HRESULT VIEW_S_LAST = (HRESULT)0x0004014F;
        public const HRESULT REGDB_E_FIRST = (HRESULT)0x80040150;
        public const HRESULT REGDB_E_LAST = (HRESULT)0x8004015F;
        public const HRESULT REGDB_S_FIRST = (HRESULT)0x00040150;
        public const HRESULT REGDB_S_LAST = (HRESULT)0x0004015F;
        public const HRESULT CAT_E_FIRST = (HRESULT)0x80040160;
        public const HRESULT CAT_E_LAST = (HRESULT)0x80040161;
        public const HRESULT CS_E_LAST = (HRESULT)0x8004016F;
        public const HRESULT CACHE_E_FIRST = (HRESULT)0x80040170;
        public const HRESULT CACHE_E_LAST = (HRESULT)0x8004017F;
        public const HRESULT CACHE_S_FIRST = (HRESULT)0x00040170;
        public const HRESULT CACHE_S_LAST = (HRESULT)0x0004017F;
        public const HRESULT OLEOBJ_E_FIRST = (HRESULT)0x80040180;
        public const HRESULT OLEOBJ_E_LAST = (HRESULT)0x8004018F;
        public const HRESULT OLEOBJ_S_FIRST = (HRESULT)0x00040180;
        public const HRESULT OLEOBJ_S_LAST = (HRESULT)0x0004018F;
        public const HRESULT CLIENTSITE_E_FIRST = (HRESULT)0x80040190;
        public const HRESULT CLIENTSITE_E_LAST = (HRESULT)0x8004019F;
        public const HRESULT CLIENTSITE_S_FIRST = (HRESULT)0x00040190;
        public const HRESULT CLIENTSITE_S_LAST = (HRESULT)0x0004019F;
        public const HRESULT INPLACE_E_FIRST = (HRESULT)0x800401A0;
        public const HRESULT INPLACE_E_LAST = (HRESULT)0x800401AF;
        public const HRESULT INPLACE_S_FIRST = (HRESULT)0x000401A0;
        public const HRESULT INPLACE_S_LAST = (HRESULT)0x000401AF;
        public const HRESULT ENUM_E_FIRST = (HRESULT)0x800401B0;
        public const HRESULT ENUM_E_LAST = (HRESULT)0x800401BF;
        public const HRESULT ENUM_S_FIRST = (HRESULT)0x000401B0;
        public const HRESULT ENUM_S_LAST = (HRESULT)0x000401BF;
        public const HRESULT CONVERT10_E_FIRST = (HRESULT)0x800401C0;
        public const HRESULT CONVERT10_E_LAST = (HRESULT)0x800401CF;
        public const HRESULT CONVERT10_S_FIRST = (HRESULT)0x000401C0;
        public const HRESULT CONVERT10_S_LAST = (HRESULT)0x000401CF;
        public const HRESULT CLIPBRD_E_FIRST = (HRESULT)0x800401D0;
        public const HRESULT CLIPBRD_E_LAST = (HRESULT)0x800401DF;
        public const HRESULT CLIPBRD_S_FIRST = (HRESULT)0x000401D0;
        public const HRESULT CLIPBRD_S_LAST = (HRESULT)0x000401DF;
        public const HRESULT MK_E_FIRST = (HRESULT)0x800401E0;
        public const HRESULT MK_E_LAST = (HRESULT)0x800401EF;
        public const HRESULT MK_S_FIRST = (HRESULT)0x000401E0;
        public const HRESULT MK_S_LAST = (HRESULT)0x000401EF;
        public const HRESULT CO_E_FIRST = (HRESULT)0x800401F0;
        public const HRESULT CO_E_LAST = (HRESULT)0x800401FF;
        public const HRESULT CO_S_FIRST = (HRESULT)0x000401F0;
        public const HRESULT CO_S_LAST = (HRESULT)0x000401FF;
        public const HRESULT EVENT_E_FIRST = (HRESULT)0x80040200;
        public const HRESULT EVENT_E_LAST = (HRESULT)0x8004021F;
        public const HRESULT EVENT_S_FIRST = (HRESULT)0x00040200;
        public const HRESULT EVENT_S_LAST = (HRESULT)0x0004021F;
        public const HRESULT XACT_E_FIRST = (HRESULT)0x8004D000;
        public const HRESULT XACT_E_LAST = (HRESULT)0x8004D02B;
        public const HRESULT XACT_S_FIRST = (HRESULT)0x0004D000;
        public const HRESULT XACT_S_LAST = (HRESULT)0x0004D010;
        public const HRESULT CONTEXT_E_FIRST = (HRESULT)0x8004E000;
        public const HRESULT CONTEXT_E_LAST = (HRESULT)0x8004E02F;
        public const HRESULT CONTEXT_S_FIRST = (HRESULT)0x0004E000;
        public const HRESULT CONTEXT_S_LAST = (HRESULT)0x0004E02F;

        #region Window messages

        public static class RegisteredMessageIds
        {
            public static readonly WindowMessageId First = (WindowMessageId)0xC000;
            public static readonly WindowMessageId Last = (WindowMessageId)0xFFFF;
            /// <summary>
            /// Undocumented.
            /// </summary>
            public static readonly WindowMessageId ShellHook = USER32.RegisterWindowMessage("SHELLHOOK");
            /// <summary>
            /// This is broadcast after the Taskbar is created, so that applications know to [re]create their tray notification icons.
            /// </summary>
            public static readonly WindowMessageId TaskbarCreated = USER32.RegisterWindowMessage("TaskbarCreated");
        }

        public static readonly WindowMessageId TDM_NAVIGATE_PAGE = WindowMessageId.WM_USER + 101;
        public static readonly WindowMessageId TDM_CLICK_BUTTON = WindowMessageId.WM_USER + 102; // wParam = Button ID
        public static readonly WindowMessageId TDM_SET_MARQUEE_PROGRESS_BAR = WindowMessageId.WM_USER + 103; // wParam = 0 (nonMarque) wParam != 0 (Marquee)
        public static readonly WindowMessageId TDM_SET_PROGRESS_BAR_STATE = WindowMessageId.WM_USER + 104; // wParam = new progress state
        public static readonly WindowMessageId TDM_SET_PROGRESS_BAR_RANGE = WindowMessageId.WM_USER + 105; // lParam = MAKELPARAM(nMinRange, nMaxRange)
        public static readonly WindowMessageId TDM_SET_PROGRESS_BAR_POS = WindowMessageId.WM_USER + 106; // wParam = new position
        public static readonly WindowMessageId TDM_SET_PROGRESS_BAR_MARQUEE = WindowMessageId.WM_USER + 107; // wParam = 0 (stop marquee), wParam != 0 (start marquee), lparam = speed (milliseconds between repaints)
        public static readonly WindowMessageId TDM_SET_ELEMENT_TEXT = WindowMessageId.WM_USER + 108; // wParam = element (TaskDialogElements), lParam = new element text (LPCWSTR)
        public static readonly WindowMessageId TDM_CLICK_RADIO_BUTTON = WindowMessageId.WM_USER + 110; // wParam = Radio Button ID
        public static readonly WindowMessageId TDM_ENABLE_BUTTON = WindowMessageId.WM_USER + 111; // lParam = 0 (disable), lParam != 0 (enable), wParam = Button ID
        public static readonly WindowMessageId TDM_ENABLE_RADIO_BUTTON = WindowMessageId.WM_USER + 112; // lParam = 0 (disable), lParam != 0 (enable), wParam = Radio Button ID
        public static readonly WindowMessageId TDM_CLICK_VERIFICATION = WindowMessageId.WM_USER + 113; // wParam = 0 (unchecked), 1 (checked), lParam = 1 (set key focus)
        public static readonly WindowMessageId TDM_UPDATE_ELEMENT_TEXT = WindowMessageId.WM_USER + 114; // wParam = element (TaskDialogElements), lParam = new element text (LPCWSTR)
        public static readonly WindowMessageId TDM_SET_BUTTON_ELEVATION_REQUIRED_STATE = WindowMessageId.WM_USER + 115; // wParam = Button ID, lParam = 0 (elevation not required), lParam != 0 (elevation required)
        public static readonly WindowMessageId TDM_UPDATE_ICON = WindowMessageId.WM_USER + 116; // wParam = icon element (TaskDialogIconElement), lParam = new icon (hIcon if TDF_USE_HICON_* was set, PCWSTR otherwise)

        public static readonly WindowMessageId WM_KEYFIRST = (WindowMessageId)0x0100;
        public static readonly WindowMessageId WM_KEYLAST = (WindowMessageId)0x0108;
        public static readonly WindowMessageId WM_IME_KEYLAST = (WindowMessageId)0x010F;
        public static readonly WindowMessageId WM_MOUSEFIRST = (WindowMessageId)0x0200;
        public static readonly WindowMessageId WM_MOUSELAST = (WindowMessageId)0x020E;
        public static readonly WindowMessageId WM_TOUCH = (WindowMessageId)0x0240;
        public static readonly WindowMessageId WM_TOUCHLAST = (WindowMessageId)0x024f;
        public static readonly WindowMessageId WM_TABLET_FIRST = (WindowMessageId)0x02c0;
        public static readonly WindowMessageId WM_TABLET_LAST = (WindowMessageId)0x02df;
        public static readonly WindowMessageId WM_HANDHELDFIRST = (WindowMessageId)0x0358;
        public static readonly WindowMessageId WM_HANDHELDLAST = (WindowMessageId)0x035F;
        public static readonly WindowMessageId WM_AFXFIRST = (WindowMessageId)0x0360;
        public static readonly WindowMessageId WM_AFXLAST = (WindowMessageId)0x037F;
        public static readonly WindowMessageId WM_PENWINFIRST = (WindowMessageId)0x0380;
        public static readonly WindowMessageId WM_PENWINLAST = (WindowMessageId)0x038F;
        public static readonly WindowMessageId WM_COALESCEFIRST = (WindowMessageId)0x0390;
        public static readonly WindowMessageId WM_COALESCELAST = (WindowMessageId)0x039f;
        public static readonly WindowMessageId WM_MM_RESERVED_FIRST = (WindowMessageId)0x03a0;
        public static readonly WindowMessageId WM_MM_RESERVED_LAST = (WindowMessageId)0x03df;

        public static readonly WindowMessageId WM_WININICHANGE = WindowMessageId.WM_SETTINGCHANGE;

        /// <summary>
        /// An application sends the WM_CPL_LAUNCH message to Windows Control Panel to request that a Control Panel application be started. 
        /// </summary>
        public static readonly WindowMessageId WM_CPL_LAUNCH = WindowMessageId.WM_USER + 0x1000;

        /// <summary>
        /// The WM_CPL_LAUNCHED message is sent when a Control Panel application, started by the WM_CPL_LAUNCH message, has closed. The WM_CPL_LAUNCHED message is sent to the window identified by the wParam parameter of the WM_CPL_LAUNCH message that started the application. 
        /// </summary>
        public static readonly WindowMessageId WM_CPL_LAUNCHED = WindowMessageId.WM_USER + 0x1001;

        #endregion

        public static readonly HANDLE WTS_CURRENT_SERVER = HANDLE.NULL;
        public static readonly HANDLE WTS_CURRENT_SERVER_HANDLE = HANDLE.NULL;
        public const string WTS_CURRENT_SERVER_NAME = null;

        /// <summary>Specifies the current session (SessionId)</summary>
        public const uint WTS_CURRENT_SESSION = unchecked((uint)-1);

        /// <summary>Specifies any-session (SessionId)</summary>
        public const uint WTS_ANY_SESSION = unchecked((uint)-2);

        public static class Guids
        {
            /*private static Dictionary<string, Guid> s_stringToGuidMap = new Dictionary<string, Guid>();
            private static Guid GetCachedGuid(string strGuid)
            {
                Guid guid;
                if (!s_stringToGuidMap.TryGetValue(strGuid, out guid))
                {
                    guid = new Guid(strGuid);
                    s_stringToGuidMap.Add(strGuid, guid);
                }
                return guid;
            }

            public static Guid IID_IAdviseSink { get { return GetCachedGuid(GuidStrings.IAdviseSink); } }*/

            #region BHIDs for IShellItem::BindToHandler()

            /// <summary>use this for IShellFolder::BindToObject() objects; IShellFolder</summary>
            public static readonly Guid BHID_SFObject = new Guid("3981e224-f559-11d3-8e3a-00c04f6837d5");
            /// <summary>use this for IShellFolder::GetUIObject() objects; IContextMenu, IDataObject, IDropTarget, IQueryAssociation, etc.</summary>
            public static readonly Guid BHID_SFUIObject = new Guid("3981e225-f559-11d3-8e3a-00c04f6837d5");
            /// <summary>use this for IShellFolder::CreateViewObject() objects; IShellView, IDropTarget, IContextMenu</summary>
            public static readonly Guid BHID_SFViewObject = new Guid("3981e226-f559-11d3-8e3a-00c04f6837d5");
            /// <summary>use this for storage objects like IStream, IPropertyStore, IStorage</summary>
            public static readonly Guid BHID_Storage = new Guid("3981e227-f559-11d3-8e3a-00c04f6837d5");
            /// <summary>use this to get an IStream for the item</summary>
            public static readonly Guid BHID_Stream = new Guid("1CEBB3AB-7C10-499a-A417-92CA16C4CB83");
            /// <summary>use this to deref the item if it is a link to get its target item, use IShellItem</summary>
            public static readonly Guid BHID_LinkTargetItem = new Guid("3981e228-f559-11d3-8e3a-00c04f6837d5");
            /// <summary>if the item is a folder use this to get an IEnumShellItems that enumerates the storage contents</summary>
            public static readonly Guid BHID_StorageEnum = new Guid("4621A4E3-F0D6-4773-8A9C-46E77B174840");
            /// <summary>if the item is a folder use this to get an ITransferSource or ITransferDestiation object</summary>
            public static readonly Guid BHID_Transfer = new Guid("5D080304-FE2C-48fc-84CE-CF620B0F3C53");
            /// <summary>use this to get an IPropertyStore or IPropertyStoreFactory to have more control over the property store for the item</summary>
            public static readonly Guid BHID_PropertyStore = new Guid("0384e1a4-1523-439c-a4c8-ab911052f586");
            /// <summary>use this to get IExtractImage / IThumbnailProvider for an item</summary>
            public static readonly Guid BHID_ThumbnailHandler = new Guid("7b2e650a-8e20-4f4a-b09e-6597afc72fb0");
            /// <summary>if the item is a folder use this to get an IEnumShellItems that enumerates all items in the folder including folders, non folders and hidden items</summary>
            public static readonly Guid BHID_EnumItems = new Guid("94f60519-2850-4924-aa5a-d15e84868039");
            /// <summary>use this to get an IDataObject for an item or an array of items IShellItem/IShellItemArray::BindToHandler()</summary>
            public static readonly Guid BHID_DataObject = new Guid("B8C0BD9F-ED24-455c-83E6-D5390C4FE8C4");
            /// <summary>use this to get an IQueryAssociations for an item or an array of items IShellItem/IShellItemArray::BindToHandler()</summary>
            public static readonly Guid BHID_AssociationArray = new Guid("bea9ef17-82f1-4f60-9284-4f8db75c3be9");
            /// <summary>use this to get an IFilter for an item</summary>
            public static readonly Guid BHID_Filter = new Guid("38d08778-f557-4690-9ebf-ba54706ad8f7");
            /// <summary>
            /// use this to retrieve an IEnumAssocHandlers that enumerates the association handlers for the given item.  Returns an
            /// enumeration of recommended handlers, similar to calling SHAssocEnumHandlers with ASSOC_FILTER_RECOMMENDED.
            /// </summary>
            public static readonly Guid BHID_EnumAssocHandlers = new Guid("b8ab0b9c-c2ec-4f7a-918d-314900e6280a");

            #endregion

            #region Class IDs

            public static readonly Guid CLSID_FileOpenDialog = new Guid("DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7");
            public static readonly Guid CLSID_FileOperation = new Guid("3ad05575-8857-4850-9277-11b85bdb8e09");
            public static readonly Guid CLSID_FileSaveDialog = new Guid("C0B4E2F3-BA21-4773-8DBA-335EC946EB8B");
            public static readonly Guid CLSID_WbemQuery = new Guid("EAC8A024-21E2-4523-AD73-A71A0AA2F56A");

            #endregion

            #region KNOWNFOLDERID (Vista or later), add more as needed ("http://msdn.microsoft.com/en-us/library/dd378457(v=VS.85).aspx")

            public static readonly Guid FOLDERID_ComputerFolder = new Guid("0AC0837C-BBF8-452A-850D-79D08E667CA7");
            public static readonly Guid FOLDERID_Desktop = new Guid("B4BFCC3A-DB2C-424C-B029-7FE99A87C641");

            #endregion

            #region Interface IDs

            public static readonly Guid IID_IAdviseSink = new Guid(InterfaceGuidStrings.IAdviseSink);
            public static readonly Guid IID_IBindCtx = new Guid(InterfaceGuidStrings.IBindCtx);
            public static readonly Guid IID_IContextMenu = new Guid(InterfaceGuidStrings.IContextMenu);
            public static readonly Guid IID_IDataObject = new Guid(InterfaceGuidStrings.IDataObject);
            public static readonly Guid IID_IDispatch = new Guid(InterfaceGuidStrings.IDispatch);
            public static readonly Guid IID_IDownloadManager = new Guid(InterfaceGuidStrings.IDownloadManager);
            public static readonly Guid IID_IDropTarget = new Guid(InterfaceGuidStrings.IDropTarget);
            public static readonly Guid IID_IEnumFORMATETC = new Guid(InterfaceGuidStrings.IEnumFORMATETC);
            public static readonly Guid IID_IEnumIDList = new Guid(InterfaceGuidStrings.IEnumIDList);
            public static readonly Guid IID_IEnumShellItems = new Guid(InterfaceGuidStrings.IEnumShellItems);
            public static readonly Guid IID_IEnumSTATDATA = new Guid(InterfaceGuidStrings.IEnumSTATDATA);
            public static readonly Guid IID_IFileDialog = new Guid(InterfaceGuidStrings.IFileDialog);
            public static readonly Guid IID_IFileDialogEvents = new Guid(InterfaceGuidStrings.IFileDialogEvents);
            public static readonly Guid IID_IFileOperation = new Guid(InterfaceGuidStrings.IFileOperation);
            public static readonly Guid IID_IFileOperationProgressSink = new Guid(InterfaceGuidStrings.IFileOperationProgressSink);
            public static readonly Guid IID_IFileSaveDialog = new Guid(InterfaceGuidStrings.IFileSaveDialog);
            public static readonly Guid IID_IInternetSecurityManager = new Guid(InterfaceGuidStrings.IInternetSecurityManager);
            public static readonly Guid IID_IInternetSecurityManagerEx2 = new Guid(InterfaceGuidStrings.IInternetSecurityManagerEx2);
            public static readonly Guid IID_IMalloc = new Guid(InterfaceGuidStrings.IMalloc);
            public static readonly Guid IID_IModalWindow = new Guid(InterfaceGuidStrings.IModalWindow);
            public static readonly Guid IID_IMoniker = new Guid(InterfaceGuidStrings.IMoniker);
            public static readonly Guid IID_IPropertyDescriptionList = new Guid(InterfaceGuidStrings.IPropertyDescriptionList);
            public static readonly Guid IID_IPropertyStore = new Guid(InterfaceGuidStrings.IPropertyStore);
            public static readonly Guid IID_IRecordInfo = new Guid(InterfaceGuidStrings.IRecordInfo);
            public static readonly Guid IID_IShellFolder = new Guid(InterfaceGuidStrings.IShellFolder);
            public static readonly Guid IID_IShellItem = new Guid(InterfaceGuidStrings.IShellItem);
            public static readonly Guid IID_IShellItem2 = new Guid(InterfaceGuidStrings.IShellItem2);
            public static readonly Guid IID_IShellItemArray = new Guid(InterfaceGuidStrings.IShellItemArray);
            public static readonly Guid IID_IShellItemFilter = new Guid(InterfaceGuidStrings.IShellItemFilter);
            public static readonly Guid IID_IShellLinkA = new Guid(InterfaceGuidStrings.IShellLinkA);
            public static readonly Guid IID_IShellLinkW = new Guid(InterfaceGuidStrings.IShellLinkW);
            public static readonly Guid IID_ITypeInfo = new Guid(InterfaceGuidStrings.ITypeInfo);
            public static readonly Guid IID_IWbemClassObject = new Guid(InterfaceGuidStrings.IWbemClassObject);
            public static readonly Guid IID_IWbemContext = new Guid(InterfaceGuidStrings.IWbemContext);
            public static readonly Guid IID_IWbemLocator = new Guid(InterfaceGuidStrings.IWbemLocator);
            public static readonly Guid IID_IWbemQualifierSet = new Guid(InterfaceGuidStrings.IWbemQualifierSet);
            public static readonly Guid IID_IWbemQuery = new Guid(InterfaceGuidStrings.IWbemQuery);
            public static readonly Guid IID_IWbemServices = new Guid(InterfaceGuidStrings.IWbemServices);

            #endregion
        }

        /// <summary>
        /// These strings are separated from their Guid counterparts so that they can also be used in GuidAttribute declarations for interfaces.
        /// </summary>
        public static class InterfaceGuidStrings
        {
            public const string IAdviseSink = "0000010f-0000-0000-C000-000000000046";
            public const string IBindCtx = "0000000e-0000-0000-C000-000000000046";
            public const string IContextMenu = "000214e4-0000-0000-c000-000000000046";
            public const string IDataObject = "0000010e-0000-0000-C000-000000000046";
            public const string IDispatch = "00020400-0000-0000-C000-000000000046";
            public const string IDownloadManager = "988934A4-064B-11D3-BB80-00104B35E7F9";
            public const string IDropTarget = "00000122-0000-0000-C000-000000000046";
            public const string IEnumFORMATETC = "00000103-0000-0000-C000-000000000046";
            public const string IEnumIDList = "000214F2-0000-0000-C000-000000000046";
            public const string IEnumShellItems = "70629033-e363-4a28-a567-0db78006e6d7";
            public const string IEnumSTATDATA = "00000105-0000-0000-C000-000000000046";
            public const string IFileDialog = "42f85136-db7e-439c-85f1-e4075d135fc8";
            public const string IFileDialogEvents = "973510db-7d7f-452b-8975-74a85828d354";
            public const string IFileOperation = "947aab5f-0a5c-4c13-b4d6-4bf7836fc9f8";
            public const string IFileOperationProgressSink = "04b0f1a7-9490-44bc-96e1-4296a31252e2";
            public const string IFileSaveDialog = "84bccd23-5fde-4cdb-aea4-af64b83d78ab";
            public const string IInternetSecurityManager = "79eac9ee-baf9-11ce-8c82-00aa004ba90b";
            public const string IInternetSecurityManagerEx2 = "F1E50292-A795-4117-8E09-2B560A72AC60";
            public const string IMalloc = "00000002-0000-0000-C000-000000000046";
            public const string IModalWindow = "b4db1657-70d7-485e-8e3e-6fcb5a5c1802";
            public const string IMoniker = "0000000f-0000-0000-C000-000000000046";
            public const string IPropertyDescriptionList = "1f9fc1d0-c39b-4b26-817f-011967d3440e";
            public const string IPropertyStore = "886d8eeb-8cf2-4446-8d02-cdba1dbdcf99";
            public const string IRecordInfo = "0000002F-0000-0000-C000-000000000046";
            public const string IShellFolder = "000214E6-0000-0000-C000-000000000046";
            public const string IShellItem = "43826d1e-e718-42ee-bc55-a1e261c37bfe";
            public const string IShellItem2 = "7e9fb0d3-919f-4307-ab2e-9b1860310c93";
            public const string IShellItemArray = "b63ea76d-1f85-456f-a19c-48159efa858b";
            public const string IShellItemFilter = "2659B475-EEB8-48b7-8F07-B378810F48CF";
            public const string IShellLinkA = "000214EE-0000-0000-C000-000000000046";
            public const string IShellLinkW = "000214F9-0000-0000-C000-000000000046";
            public const string ITypeInfo = "00020401-0000-0000-C000-000000000046";
            public const string IUnknown = "00000000-0000-0000-C000-000000000046";
            public const string IUri = "A39EE748-6A27-4817-A6F2-13914BEF5890";
            public const string IWbemClassObject = "dc12a681-737f-11cf-884d-00aa004b2e24";
            public const string IWbemContext = "44aca674-e8fc-11d0-a07c-00c04fb68820";
            public const string IWbemLocator = "dc12a687-737f-11cf-884d-00aa004b2e24";
            public const string IWbemQualifierSet = "dc12a680-737f-11cf-884d-00aa004b2e24";
            public const string IWbemQuery = "81166f58-dd98-11d3-a120-00105a1f515a";
            public const string IWbemServices = "9556dc99-828c-11cf-a37e-00aa003240c7";
        }

        public static class ModuleNames
        {
            public const string ADVAPI32 = "advapi32.dll";
            public const string COMCTL32 = "comctl32.dll";
            public const string DWMAPI = "dwmapi.dll";
            public const string ESENT = "esent.dll";
            public const string IPHLPAPI = "iphlpapi.dll";
            public const string KERNEL32 = "kernel32.dll";
            public const string KTMW32 = "ktmw32.dll";
            public const string MSVCRT = "msvcrt.dll";
            public const string NETAPI32 = "netapi32.dll";
            public const string NTDLL = "ntdll.dll";
            public const string OLE32 = "ole32.dll";
            public const string OLEAUT32 = "oleaut32.dll";
            public const string PDH = "pdh.dll";
            public const string PSAPI = "psapi.dll";
            public const string RUNDLL32 = "rundll32.exe";
            public const string SCRNSAVE = "scrnsave.dll";
            public const string SECUR32 = "secur32.dll";
            public const string SHELL32 = "shell32.dll";
            public const string SHLWAPI = "shlwapi.dll";
            public const string URLMON = "urlmon.dll";
            public const string USER32 = "user32.dll";
            public const string USERENV = "userenv.dll";
            public const string WINHTTP = "winhttp.dll";
            public const string WININET = "wininet.dll";
            public const string WINMM = "winmm.dll";
            public const string WS2_32 = "ws2_32.dll";
            public const string WTSAPI = "wtsapi32.dll";
        }

        public static class ClipboardFormatNames
        {
            // http://msdn.microsoft.com/en-us/library/bb776902.aspx
            // http://msdn.microsoft.com/en-us/library/windows/desktop/bb776902(v=vs.85).aspx
            public const string CFSTR_SHELLIDLIST = "Shell IDList Array";                  // CF_IDLIST
            public const string CFSTR_SHELLIDLISTOFFSET = "Shell Object Offsets";                // CF_OBJECTPOSITIONS
            public const string CFSTR_NETRESOURCES = "Net Resource";                        // CF_NETRESOURCE
            public const string CFSTR_FILEDESCRIPTORA = "FileGroupDescriptor";                 // CF_FILEGROUPDESCRIPTORA
            public const string CFSTR_FILEDESCRIPTORW = "FileGroupDescriptorW";                // CF_FILEGROUPDESCRIPTORW
            public const string CFSTR_FILECONTENTS = "FileContents";                        // CF_FILECONTENTS
            public const string CFSTR_FILENAMEA = "FileName";                            // CF_FILENAMEA
            public const string CFSTR_FILENAMEW = "FileNameW";                           // CF_FILENAMEW
            public const string CFSTR_PRINTERGROUP = "PrinterFriendlyName";                 // CF_PRINTERS
            public const string CFSTR_FILENAMEMAPA = "FileNameMap";                         // CF_FILENAMEMAPA
            public const string CFSTR_FILENAMEMAPW = "FileNameMapW";                        // CF_FILENAMEMAPW
            public const string CFSTR_SHELLURL = "UniformResourceLocator";
            public const string CFSTR_INETURLA = CFSTR_SHELLURL;
            public const string CFSTR_INETURLW = "UniformResourceLocatorW";
            public const string CFSTR_PREFERREDDROPEFFECT = "Preferred DropEffect";
            public const string CFSTR_PERFORMEDDROPEFFECT = "Performed DropEffect";
            public const string CFSTR_PASTESUCCEEDED = "Paste Succeeded";
            public const string CFSTR_INDRAGLOOP = "InShellDragLoop";
            public const string CFSTR_MOUNTEDVOLUME = "MountedVolume";
            public const string CFSTR_PERSISTEDDATAOBJECT = "PersistedDataObject";
            public const string CFSTR_TARGETCLSID = "TargetCLSID";                         // HGLOBAL with a CLSID of the drop target
            public const string CFSTR_LOGICALPERFORMEDDROPEFFECT = "Logical Performed DropEffect";
            public const string CFSTR_AUTOPLAY_SHELLIDLISTS = "Autoplay Enumerated IDList Array";    // (HGLOBAL with LPIDA;
            public const string CFSTR_UNTRUSTEDDRAGDROP = "UntrustedDragDrop";                   //  DWORD
            public const string CFSTR_FILE_ATTRIBUTES_ARRAY = "File Attributes Array";               // (FILE_ATTRIBUTES_ARRAY format on HGLOBAL;
            public const string CFSTR_INVOKECOMMAND_DROPPARAM = "InvokeCommand DropParam";             // (HGLOBAL with LPWSTR;
            public const string CFSTR_SHELLDROPHANDLER = "DropHandlerCLSID";                    // (HGLOBAL with CLSID of drop handler;
            public const string CFSTR_DROPDESCRIPTION = "DropDescription";                     // (HGLOBAL with DROPDESCRIPTION;
        }
    }
}